<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:set var="contextPath" value="${pageContext.request.contextPath}"/>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
	<link rel="stylesheet" type="text/css" href="${contextPath}/styles/styles.css" />
	<title>Design Webshop Maria Freudenreich</title>
</head>

<body>
	<center>
		<jsp:include page="./pageLayout/header.jsp" />
		<div class="body" style="background-image: url(${contextPath}/images/bodyBackground.png);">
			<div class="sidebar">
				<div class="button"><a href="../index.html">Home</a></div>
				<div class="button"><a href="../flows/registration.html">Login</a></div>
				<div class="button"><a href="../flows/order.html">Warenkorb</a></div>
			</div>
			<div class=innerBody>
				<div class="articleImageLarge">
					<fieldset><legend>Detailbild</legend>
						<c:if test="${article.imageLargePath == null}">
							<img width="200" alt="Kein Bild" src="${contextPath}/images/noPicture.png">
						</c:if>
						<c:if test="${article.imageLargePath ne ''}">
							<img width="200" alt="${article.title}" src="${contextPath}${article.imageLargePath}">
						</c:if>
					</fieldset>
				</div>
				<div class="articleDetails">
					<form:form method="POST" commandName="article" enctype="multipart/form-data">
						<fieldset><legend>Generelle Beschreibung</legend>
							<table>
								<tr>
									<td class="articleForm">Titel:</td>
									<td><form:input path="title" size="29"/></td>
								</tr>
								<tr>
									<td class="articleForm">Beschreibung:</td>
									<td><form:textarea path="description" cssStyle="width: 218px;"/></td>
								</tr>
								<tr>
									<td class="articleForm"><label for="file" >File(Kleines Bild)</label><br/>
									</td>
									<td><input name="fileSmallImage" type="file"/></td>
								</tr>
								<tr>
									<td class="articleForm"><label for="file" >File(Gro&szlig;es Bild)</label><br/>
									</td>
									<td><input name="fileLargeImage" type="file"/></td>
								</tr>
							</table>
						</fieldset>
						<fieldset><legend>Ma&szlig;e</legend>
							<table>
								<tr>
									<td class="articleForm">H&ouml;he:</td>
									<td><form:input path="height" size="29"/></td>
								</tr>
								<tr>
									<td class="articleForm">Breite:</td>
									<td><form:input path="length" size="29"/></td>
								</tr>
								<tr>
									<td class="articleForm">Tiefe:</td>
									<td><form:input path="depth" size="29"/></td>
								</tr>
								<tr>
									<td class="articleForm">Gewicht:</td>
									<td><form:input path="weight" size="29"/></td>
								</tr>
							</table>
						</fieldset>
						<fieldset><legend>Preisangaben</legend>
							<table>
								<tr>
									<td class="articleForm">Preis:</td>
									<td><form:input path="price" size="29"/></td>
								</tr>
								<tr>
									<td class="articleForm">Steuersatz:</td>
									<td>
										<form:select path="tax">
											<form:option value="0.19f" label="19%"/>
											<form:option value="0.07f" label="7%"/>
										</form:select>
									</td>
								</tr>
							</table>
						</fieldset>
						<fieldset><legend>Aktivierung</legend>
							<table>
								<tr>
									<td class="articleForm">Aktiv ab:</td>
									<td><form:input path="activeSince" size="29"/></td>
								</tr>
								<tr>
									<td class="articleForm">Inaktiv ab:</td>
									<td><form:input path="inactiveSince" size="29"/></td>
								</tr>
							</table>
						</fieldset>
						<input type="submit" value="Speichern"/>
					</form:form>
				</div>
			</div>
		</div>
	</center>
</body>
</html>